# This is a Makefile for gcc
# 27-Mar-96	JWP	Molecular Structure Corporation
#
#
# Copyright (C) 2014 Rigaku Americas Corporation
#                    9009 New Trails Drive
#                    The Woodlands, TX, USA  77381
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#    * Redistributions of source code must retain the above copyright
#      notice(s), this list of conditions and the following disclaimer.
#    * Redistributions in binary form must reproduce the above copyright
#      notice(s), this list of conditions and the following disclaimer in the
#      documentation and/or other materials provided with the distribution.
#    * Neither the name of the Rigaku Americas Corporation nor the
#      names of its contributors may be used to endorse or promote products
#      derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL RIGAKU AMERICAS CORPORATION BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
#
# Define method to get system architecture to use in subsequent file names:
#
#
# Generated by the ICS builderXcessory (BX).
#
#
# Builder Xcessory ilder Xcessory 3.5.1 .
#
#

#DEVDIR= ../AFC
#DEVDIR= .
DEVDIR= ../DTDEV
#DEVDIR= ../DTDEVRAXISC

INSTALLDIR      = ../../bin_irix
CC=g++

###-DSGI -DRAXIS4_CLIENT 
C++FLAGS=-g -DNEW_IOS -DFUNCPROTO -DXTFUNCPROTO -L../DTTREK -L../DTDISPLAY -I../DTTREK -I../DTDISPLAY  -I$(DEVDIR) -L$(DEVDIR) -I/usr/local/lib/g++-include 
LIBS=-ldtrek$(OSTYPE) -ldtrekX$(OSTYPE) -ldtrekDev$(OSTYPE) -lXm -lXt -lX11 -lds -lm -lPW
OFILES = main-cc.o UIComponent.o bxutils-cc.o callbacks-cc.o CUIviewheader.o CUIheaderEdit.o CUIeditdetector.o CUInumberField.o CUIom8.o CUIom2.o CUIom9.o CUIimagefileSelect.o CUIwavelength.o CUIPSfileSelect.o MainWindow.o 
FILES = main-cc.cc UIComponent.cc bxutils-cc.cc callbacks-cc.cc CUIviewheader.cc CUIheaderEdit.cc CUIeditdetector.cc  CUInumberField.cc CUIom8.cc CUIom2.cc CUIom9.cc CUIimagefileSelect.cc CUIwavelength.cc CUIPSfileSelect.cc MainWindow.cc 

ALL	= dtcollect
RM 	= rm -f

# User-specified options:




all: dtcollect gifs

dtcollect: $(OFILES)
	$(CC) $(C++FLAGS) $(OFILES) $(LIBS) -o $@


main-cc.o: main-cc.cc
	$(CC) $(C++FLAGS) -c main-cc.cc

UIComponent.o: UIComponent.cc
	$(CC) $(C++FLAGS) -c UIComponent.cc

bxutils-cc.o: bxutils-cc.cc
	$(CC) $(C++FLAGS) -c bxutils-cc.cc

callbacks-cc.o: callbacks-cc.cc
	$(CC) $(C++FLAGS) -c callbacks-cc.cc

CUIviewheader.o: CUIviewheader.cc
	$(CC) $(C++FLAGS) -c CUIviewheader.cc

CUIheaderEdit.o: CUIheaderEdit.cc
	$(CC) $(C++FLAGS) -c CUIheaderEdit.cc

CUIeditdetector.o: CUIeditdetector.cc CUIeditdetector.h
	$(CC) $(C++FLAGS) -c CUIeditdetector.cc

CUInumberField.o: CUInumberField.cc
	$(CC) $(C++FLAGS) -c CUInumberField.cc

CUIom8.o: CUIom8.cc
	$(CC) $(C++FLAGS) -c CUIom8.cc

CUIom2.o: CUIom2.cc
	$(CC) $(C++FLAGS) -c CUIom2.cc

CUIom9.o: CUIom9.cc
	$(CC) $(C++FLAGS) -c CUIom9.cc

CUIimagefileSelect.o: CUIimagefileSelect.cc
	$(CC) $(C++FLAGS) -c CUIimagefileSelect.cc

CUIwavelength.o: CUIwavelength.cc
	$(CC) $(C++FLAGS) -c CUIwavelength.cc

CUIPSfileSelect.o: CUIPSfileSelect.cc
	$(CC) $(C++FLAGS) -c CUIPSfileSelect.cc

MainWindow.o: MainWindow.cc
	$(CC) $(C++FLAGS) -c MainWindow.cc

Scan1.gif:		Scan1.UU
	uudecode $^

Scan2.gif:		Scan2.UU
	uudecode $^

ScanFile.gif:		ScanFile.UU
	uudecode $^

Wavelength.gif:		Wavelength.UU
	uudecode $^

Example1.gif:		Example1.UU
	uudecode $^

gifs:	Scan1.gif Scan2.gif ScanFile.gif Wavelength.gif Example1.gif

ocodecenter:: 
	#load $(C++FLAGS) $(OFILES) $(LIBS)

codecenter:: 
	#load $(C++FLAGS) $(CFILES) $(LIBS)

#clean::
#	$(RM) $(OFILES) dtcollect

install:	$(ALL)
		if [ ! -d $(INSTALLDIR) ];then mkdir $(INSTALLDIR);fi;
		for X in $(ALL); do \
			cp $$X $(INSTALLDIR); done

clean:
	$(RM) $(OFILES) *.a $(ALL)

cleanbin:
	$(RM) dtcollect MainWindow.o
